﻿using System;
using System.ComponentModel;
using System.Windows;
using System.Globalization;
using System.Windows.Data;

namespace CodeCounsel.SharePoint.RibbonDesigner.View.TypeConverters
{
    class ExtensionAvailabilityToVisibilityConverter
        : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool isProVersion = false;
            bool hasExtensions = (bool)value;
            return isProVersion || hasExtensions ? Visibility.Visible : Visibility.Hidden;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
